package org.example.liaoxuefeng.tongyilingma;

/**
 * @author: 默苍璃
 * @date: 2024-07-17 17:32
 */
public class Test {
    public static void main(String[] args) {
        TextEditor editor = new TextEditor();
        editor.add("Hello");
        editor.add(" ");
        editor.add("World!");
        System.out.println(editor.getState()); // Hello World!

        editor.undo();
        System.out.println(editor.getState()); // Hello

        editor.redo();
        System.out.println(editor.getState()); // Hello World!
    }

}
